{% load static %}
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>旅游推荐系统 - 注册</title>
    <!-- 引入 Bootstrap 5 -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- 引入 Font Awesome -->
    <link rel="stylesheet" href="{% static 'plugins/font-awesome-4.7.0/css/font-awesome.css' %}">
    <!-- 引入自定义CSS -->
    <link rel="stylesheet" href="{% static 'css/auth.css' %}">
</head>
<body>
    <div class="container py-5">
        <div class="auth-container">
            <div class="row g-0">
                <div class="col-lg-6 d-none d-lg-block">
                    <div class="auth-image">
                        <div class="auth-image-content">
                            <h2>加入我们</h2>
                            <p>创建一个新账户，开始您的旅行探索之旅</p>
                            <div>
                                <i class="fa fa-check-circle me-2"></i> 个性化旅游推荐<br>
                                <i class="fa fa-check-circle me-2"></i> 独家优惠和折扣<br>
                                <i class="fa fa-check-circle me-2"></i> 专业旅游攻略<br>
                                <i class="fa fa-check-circle me-2"></i> 安全便捷的预订服务
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-lg-6">
                    <div class="auth-form">
                        <div class="auth-tabs">
                            <a href="{% url 'login' %}" class="auth-tab">登录</a>
                            <div class="auth-tab active">注册</div>
                        </div>

                        <form class="auth-form-content" method="post" action="{% url 'register' %}">
                            {% csrf_token %}
                            <input type="hidden" name="form_type" value="register">
                            <h3 class="form-title">创建新账户</h3>

                            <!-- 角色选择器 -->
                            <div class="role-selector mb-4">
                                <div class="role-option active">
                                    <input type="radio" id="register-role-user" name="register_role" value="user" checked>
                                    <label for="register-role-user">用户</label>
                                </div>
                                <div class="role-option">
                                    <input type="radio" id="register-role-culture" name="register_role" value="culture">
                                    <label for="register-role-culture">文旅</label>
                                </div>
                                <div class="role-option">
                                    <input type="radio" id="register-role-admin" name="register_role" value="admin">
                                    <label for="register-role-admin">管理员</label>
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="register-username" class="form-label">用户名</label>
                                <input type="text" class="form-control" id="register-username" name="username" placeholder="请输入用户名" required>
                            </div>
                            <div class="form-group">
                                <label for="register-email" class="form-label">电子邮箱</label>
                                <input type="email" class="form-control" id="register-email" name="email" placeholder="请输入电子邮箱" required>
                            </div>
                            <div class="form-group">
                                <label for="register-password" class="form-label">密码</label>
                                <input type="password" class="form-control" id="register-password" name="password" placeholder="请输入密码" required>
                            </div>
                            <div class="form-group">
                                <label for="register-confirm-password" class="form-label">确认密码</label>
                                <input type="password" class="form-control" id="register-confirm-password" name="confirm_password" placeholder="请再次输入密码" required>
                            </div>
                            <div class="form-group form-check mb-3">
                                <input type="checkbox" class="form-check-input" id="agree-terms" name="agree_terms" required>
                                <label class="form-check-label" for="agree-terms">我已阅读并同意<a href="#" class="text-decoration-none">服务条款</a>和<a href="#" class="text-decoration-none">隐私政策</a></label>
                            </div>
                            <button type="submit" class="btn btn-auth mb-3">注册</button>

                            <div class="auth-footer">
                                已有账号? <a href="{% url 'login' %}">立即登录</a>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
</html>